package OOP.day10.AnimalDemo04;

import OOP.day09.AnimalDemo02.AnimalEat;

public class Dog extends Animal implements AnimalEat, Swim {

    public Dog() {
    }

    public Dog(String name, int age, String color) {
        super(name, age, color);
    }

    //重写eat方法
    @Override
    public void eat() {
        System.out.println(color + "色的" + age + "岁的狗" + name + "在吃骨头");
    }

    public void lookHome() {
        System.out.println(color + "色的" + age + "岁的狗" + name + "正在看家");
    }

    @Override
    public void swim() {
        System.out.println(color + "颜色的" + age + "岁的小狗" + name + "正在游泳！");
    }
}
